package com.dog.basics.api.controller.common;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dog.basics.bean.dto.admin.common.ArticleClassFormDto;
import com.dog.basics.bean.vo.admin.common.PcArticleClassVo;
import com.dog.basics.common.constant.SwaggerConstants;
import com.dog.basics.common.util.PageParam;
import com.dog.basics.common.util.R;
import com.dog.basics.security.annotation.Inner;
import com.dog.basics.service.common.IDogComArticleClassService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * <p>
 * cms文章分类表 前端控制器
 * </p>
 *
 * @author guonh
 * @since 2020-05-20
 */
@RestController
@RequestMapping("/api/article/class")
@Api(value = "CMS文章模块", tags = SwaggerConstants.API_ALL)
@AllArgsConstructor
@ApiIgnore
public class DogComArticleClassController {
    private final IDogComArticleClassService dogComArticleClassService;

    /**
     * @Description: 分页cms文章分类列表
     * @Param: status
     * @return: IPage<PcArticleClassVo>
     * @Author: zhangmr
     * @Date:
     */
    @Inner
    @ApiOperation(value = "分页cms文章分类列表", notes = "分页cms文章分类列表", tags = SwaggerConstants.API_TZWZ)
    @GetMapping("/page")
    public R<IPage<PcArticleClassVo>> page(PageParam page, ArticleClassFormDto articleClassFormDto) {
        return R.ok(dogComArticleClassService.getPageList(page, articleClassFormDto));
    }

}
